#include <stdio.h>

int n, m, a;
long long ans;
int size;

int main() {
	scanf("%d %d %d", &n, &m, &a);
	
	size=n/a;

	if (n%a!=0) size++;
	ans = size;

	size = m/a;

	if (m%a!=0) size++;

	ans*=(long long) size;

	printf("%lld\n", ans);

	return 0;
}
